<!DOCTYPE html>
<html xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>病历</title>
    <link href="../../static/bootstrap/css/bootstrap.min.css" rel="stylesheet"
          th:href="@{/bootstrap/css/bootstrap.min.css}">
    <link href="../../static/h-ui/css/layui.css" rel="stylesheet" th:href="@{/h-ui/css/layui.css}">
    <link href="../../static/css/patient.css" rel="stylesheet" th:href="@{/css/patient.css}">
    <script src="../../static/lib/jquery/1.9.1/jquery.js" th:src="@{/lib/jquery/1.9.1/jquery.js}"></script>
    <script src="../../static/bootstrap/js/bootstrap.min.js" th:src="@{/bootstrap/js/bootstrap.min.js}"></script>
</head>
<body>

<div style="width: 100%;background-color: #ffffff;height: 80px;box-shadow:0 10px 10px 0 #66788152;position: fixed;right:0;left: 0;z-index: 11">
    <div style="width: 90%;margin: 0 auto;display: flex;justify-content:space-between">
        <div>
            <!--            <img src="/zp/bjdxrmyy.png">-->
            <h1 style="padding: 15px;">北大·药学院</h1>
        </div>
        <div style="display: flex;margin-top:25px;">
            <div th:text="${student.name}">姓名&nbsp;|</div>&nbsp;|
            <div th:text="${student.account}">&nbsp;学号&nbsp;|</div>&nbsp;|
            <div th:text="${student.className}">&nbsp;班级</div>
        </div>
    </div>
</div>
<!--主体 分为左右布局-->
<div class="row" style="padding-top: 95px; margin: 0; background-color: #e1e1e8;">
    <div class="col-md-10 col-md-offset-1">
        <div class="jumbotron" style="padding: 10px 0px; background-color: #e1e1e8;">
            <div class="container" style="padding: 0;margin: auto;background: #ffffff;width: 100%;">
                <!--病历列表-->
                <div class="col-md-12" style="padding: 15px;">

                    <div class="panel panel-default">
                        <div class="panel-body" style="line-height: 0px;">
                            <span class="patient-rightTopSpan"><strong>当前账号:</strong></span>
                            <span class="layui-badge layui-bg-green"><strong
                                    th:utext="${student.account}"></strong></span>
                            <span class="patient-rightTopSpan"><strong>当前科室:</strong></span>
                            <span class="layui-badge layui-bg-blue"><strong
                                    th:utext="${student.department}"></strong></span>
                            <span class="patient-rightTopSpan"><strong>以开处方:</strong></span>
                            <span class="layui-badge layui-bg-orange"><strong
                                    th:text="${recipe.size()}"></strong></span>
                            <span class="patient-rightTopSpan"><strong>审方通过:</strong></span>
                            <span class="layui-badge layui-bg-red"><strong
                                    th:text="${status.size()}"></strong></span>
                            <span class="patient-rightTopSpan"><strong>病历总数:</strong></span>
                            <span class="layui-badge layui-bg-red"><strong
                                    th:text="${patients.size()}"></strong></span><br>&nbsp;&nbsp;&nbsp;
                        </div>
                    </div>
                    <!--状态提示-->
                    <div style="overflow: hidden;margin-bottom: 20px;">
                        <div style="width: 40%;float: right;">
                            <span class="glyphicon glyphicon-time"
                                  style="color: #ccc;"></span>
                            <span>&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;&nbsp;为待处理病历</span>&nbsp;&nbsp;&nbsp;
                            <span class="glyphicon glyphicon-ok" style="color: green;"></span>
                            <span>&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;&nbsp;开出处方审验通过</span>&nbsp;&nbsp;&nbsp;
                            <span class="glyphicon glyphicon-remove" style="color: red;"></span>
                            <span>&nbsp;&nbsp;&nbsp;:&nbsp;&nbsp;&nbsp;开出处方审验退回</span>
                        </div>
                    </div>
                    <div class="panel panel-default" th:if="${patients.size()==0}">
                        <div class="panel-heading">
                            <h3 class="panel-title"></h3>
                        </div>
                        <div class="panel-body">
                            暂无数据
                        </div>
                    </div>
                    <div class="panel panel-default" th:each="patient,count:${patients}">
                        <div class="panel-heading">
                            <span class="glyphicon glyphicon-time" style="color: #ccc;"
                                  th:class="${patient.status eq null} ? 'glyphicon glyphicon-time':(${patient.status eq 1} ? 'glyphicon glyphicon-ok' : 'glyphicon glyphicon-remove')"
                                  th:style="${patient.status eq null} ? 'color:#ccc' : (${patient.status eq 1} ? 'color:green':'color:red')"
                            ></span>
                            <span class="panel-title" style="margin-left: 10px;"
                                  th:text="${patient.patientName}"></span>
                            <span style="margin-left: 10px;" th:text="${patient.sex eq 1}?'男':'女'"></span>
                            <span style="margin-left: 10px;" th:text="${patient.age}"></span>
                        </div>
                        <div class="panel-body" style="line-height: 40px;">
                            <span style="margin-right: 20px;">临床诊断:</span><span>[[${patient.diagnosis}]]</span>
                            <span style="padding: 6px;box-sizing: border-box;display: inline;"
                                  th:class="${patient.fetation eq 1}?'layui-badge layui-bg-orange':'layui-badge'"
                                  th:text="${patient.fetation eq 1}? '怀孕':'未怀孕'"></span>
                            <span style="padding: 6px;box-sizing: border-box;display: inline;"
                                  th:class="${patient.lactation eq 1 }? 'layui-badge layui-bg-orange':'layui-badge'"
                                  th:text="${patient.lactation eq 1} ? '哺乳':'未哺乳'"></span>

                            <button class="layui-btn layui-btn-sm"
                                    style="background:#009688;float: right;margin-top: 5px;"
                                    type="button"><a
                                    style="color: #ffffff;"
                                    th:href="@{/views/views/recipe(id=${patient.id})}">处方</a></button>
                        </div>
                    </div>

                    <!--分页-->
                    <div th:include="_pagination :: page"></div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>